Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CADC-13844 - refactor to #84

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

SharonGoliath
Copy link
Collaborator

The behaviour that got changed:

  1. Handle the max_records_encountered case automatically. This is because the endpoint now has a limit of 500 records, and that gets encountered fairly consistently.

The refactoring that is in progress (incremental mode only for now):
2. Use a RunnerMeta class, with a StorageName instance, instead of the StateRunnerMeta class. Using the StateRunnerMeta class resulted in throwing away some useful metadata, that then needed to be reacquired from either archive.gemini.edu or from header files, so this pull request stops doing that, for incremental execution only.
3. Remove the need for MetadataReader specializations. Without those classes, the FileInfo and header from the MetadataReader class has been moved to the StorageName class. The MetadataReader pattern required explicit clean_up and reset calls. This pull request removes the needs for those extra calls, and the resulting wide variations in memory usage.
4. Remove the need for the name_build_composable.py classes/specializations. This can be done as a result of (2).

@@ -1224,8 +1240,21 @@ def _remove_processing_detritus(values, obs_id):


class Bhros(GeminiMapping):
def __init__(self, storage_name, headers, lookup, instrument, clients, observable, observation, config):
super().__init__(storage_name, headers, lookup, instrument, clients, observable, observation, config)
def __init__(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm missing something, but looks like this __init__ is not necessary since by default the super class one is called anyway. Comment applies to other classes in this file.

def _mock_get_head(file_id):
return _mock_headers(file_id, file_id)


from caom2 import Algorithm, SimpleObservation

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misplaced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants